home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Program: JetCopy - High speed file copy for Z3PLUS
- ; Author: Carson Wilson
- ; Assembly: ZMAC, ZML, PARMLIB, ZSLIB, SYSLIB
- ; Version: 1.2
-
- VERS equ 12
-
- ; Date: 31 Mar 90
- ; Changes: Now skips stamp read if the file stamping is toggled off.
-
- ; Version: 1.1
- ; Date: 23 Mar 90
- ; Changes: Removed DMABUF for Set Stamp calls; use RAMPTR instead for even
- ; more buffer space. Also changed BUFnRECS storage to 1 byte
- ; each.
-
- ; Version: 1.0
- ; Date: 22 Feb 90
- ; Changes: Cleaned up output screens.
- ; Added installable "no stamp" (/D) command line toggle.
- ;
- ; Version: 0.9
- ; Date: 16 Feb 90
- ; Changes: Added test for validity of BCD stamp (CPM3 may return 00's).
- ; Cleaned up exit code.
- ; Checks for CP/M plus, and aborts if not found.
- ; More explicit set stamp error messages.
- ; Consolidated multiple read/write routines to save space.
- ; Tells KBytes transferred instead of records.
- ;
- ; Version: 0.9
- ; Date: 7 Feb 90
- ; Changes: Cleaned up code, bell on erase messages, better help, etc.
- ; Version: 0.8
- ;
- ; Date: 6 Feb 90
- ; Changes: Use ZCPR error handler routines.
- ; Version: 0.7
- ;
- ; Initial version
- ; 12/14/89 C.Wilson
- ;
- ; Usage: CP [d:]source [d:]dest
- ; CP d:source [d:][dest]
-
-
- FALSE equ 0
- TRUE equ not false
-
- PLUS equ TRUE ; TRUE for Z3PLUS version
-
- BELL equ 07h
- BS equ 08h
- TAB equ 09h
- LF equ 0Ah
- CR equ 0Dh
-
- BDOS equ 5
- PRINTS equ 9
- FOPEN equ 15
- FCLOSE equ 16
- FDEL equ 19
- FREADS equ 20
- FWRITS equ 21
- FMAKE equ 22
- CURDSK equ 25
- SDMA equ 26
- SFATT equ 30
- FUSER equ 32
- FREADR equ 33
- FWRITR equ 34
- FMULTI equ 44
- ERMODE equ 45
-
- FCB1 equ 5Ch
- FCB2 equ 6Ch
- FCBLEN equ 36
- FNAMELN equ 12
- ROOFF equ 9 ; Offset to R/O attribute
-
- MULTILN equ 128*128 ; One CP/M Plus Multi-Sector Full
-
-
- EXTRN CRLF, COUT, PRINT, PSTR, PFN2, PHLFDC, BIOS ; SYSLIB
- EXTRN PAFDC
-
- EXTRN GSTPCP, SSTPCP, ISBCDD, DOSTYP, DOSVER ; ZSLIB
-
- EXTRN PARGET ; PARMLIB
-
- PUBLIC $MEMRY
-
- .request PARLIB, ZSSSTPCP, ZSLIB, SYSLIB
-
-
- ; ================================================
-
- ; PROGRAM BEGINS
-
- rst 0 ; Z34 only
- dw START
- db 'Z3ENV'
- db 1
- ENVADDR:
- dw 0
-
- ; Installable options
-
- db '[OPTIONS>'
- DATEDEF:
- db 0FFh ; Default: DO stamp files
- START:
- ld (STKSAV),sp
- ld sp,STACK
-
- ld hl,SIGNST
- call PSTR
-
- ld hl,FCB1+1
- ld a,(hl)
- cp ' '
- jp z,HELP
- cp '?'
- jp z,HELP
- cp '/'
- jr nz,INIT
- inc hl
- ld a,(hl)
- cp '/'
- jr nz,INIT
- inc hl
- ld a,(hl)
- cp ' '
- jp z,HELP
- INIT:
- call DOSTYP
- ld a,(DOSVER)
- cp 30h
- jp c,NOTC3
-
- ; Check for [[/]options]
-
- ld a,3
- call PARGET ; Have 3rd parm?
- jr z,PARM2 ; No
- cp '/'
- jr z,PARM2A
- jr PARM2B
- PARM2:
- ld a,2 ; Have 2nd?
- call PARGET
- jr z,NOOPT ; No.
- cp '/' ; Yes, option?
- jr nz,NOOPT ; No.
- ld a,' '
- ld (FCB2+1),a ; Yes, flag 2nd FCB blank
- PARM2A: inc hl ; Move to option character
- PARM2B: ld a,(hl)
- cp 'D' ; Stamp switch?
- jp nz,BADOPT ; No, abort.
- ld a,(DATEDEF) ; Yes, toggle default
- cpl
- jr SAVOPT
- NOOPT:
- ld a,(DATEDEF)
- SAVOPT: ld (DATEOPT),a
-
- call DIRCHEK
- ld a,(FCB1+13)
- ld (SUSER),a
- ld a,(FCB2+13)
- ld (DUSER),a
- ld hl,FCB2
- ld bc,FNAMELN
- ld de,CPFCB
- ldir
-
- ld h,d ; Initialize rest
- ld l,e
- inc de
- ld (hl),0
- ld bc,FCBLEN-FNAMELN-1
- push bc
- ldir
-
- pop bc ; Initialize rest
- ld hl,FCB1+FNAMELN
- ld d,h
- ld e,l
- inc de
- ld (hl),0
- ldir
-
- ld c,CURDSK ; Get current disk
- call BDOS
- inc a
- ld b,a
- ld a,(FCB1)
- or a
- jr nz,GOTDSK1
- ld a,b
- ld (FCB1),a
- GOTDSK1:
- ld a,(CPFCB)
- or a
- jr nz,GOTDSK2
- ld a,b
- ld (CPFCB),a
- GOTDSK2:
- ld a,(CPFCB+1)
- cp ' ' ; FCB2 was blank?
- jr nz,INIT1 ; No
- ld de,CPFCB+1 ; Yes, then copy from FCB1
- ld hl,FCB1+1
- ld bc,11
- ldir
-
- ld hl,FCB1+1 ; Check and abort on wildcards
- call IFWILD
- ld hl,CPFCB+1
- call IFWILD
-
- ; Check duplicate filespecs
-
- ld a,(SUSER)
- ld b,a
- ld a,(DUSER)
- cp b
- jr nz,INIT1 ; Not same if different users
- ld hl,FCB1
- ld de,CPFCB
- ld b,12
- DUPCHK: ld a,(de)
- cp (hl)
- inc de
- inc hl
- jr nz,INIT1 ; Not same if different filespecs
- djnz DUPCHK
- jp DUPERR ; Abort if drive and name same
-
- INIT1: ; Tell what we're copying
- call PRINT
- db ' Copying ',0
- ld a,(FCB1)
- add a,'@'
- call COUT
- ld a,(SUSER)
- call PAFDC
- ld a,':'
- call COUT
- ld de,FCB1+1
- call PFN2
- call PRINT
- db ' to ',0
- ld a,(CPFCB)
- add '@'
- call COUT
- ld a,(DUSER)
- call PAFDC
- ld a,':'
- call COUT
- ld de,CPFCB+1
- call PFN2
- call CRLF
-
- ld a,(SUSER) ; Open source file
- ld e,a
- ld c,FUSER
- call BDOS
- ld de,FCB1
- ld c,FOPEN
- call BDOS
- inc a
- jp z,NOFLERR
-
- ld a,(DATEOPT) ; Do stamp?
- or a
- jr z,INIT2 ; No.
-
- ld de,FCB1 ; Get source stamp
- ld hl,STPBUF
- call GSTPCP
- ld (GOTSTP),a
- INIT2:
-
- ;
- ; Perform high-speed disk I/O
- ;
-
- ; First initialize pointers
-
- xor a
- ld (EOFFLG),a
- ld hl,0
- ld (XFERED),hl
- ld (BUF1PTR),hl
- ld (BUF1RECS),a
- ld (BUF2PTR),hl
- ld (BUF2RECS),a
- ld (BUF3PTR),hl
- ld (BUF3RECS),a
- ld (BUF4PTR),hl
- ld (BUF4RECS),a
-
- ; Now allocate all free space for multisector read/write buffers (up to four)
-
- ld bc,(RAMPTR) ; Free RAM
- call FRECS
- jp c,TPAERR ; TPA remaining < 128 bytes
- ld (BUF1PTR),bc
- ld (BUF1RECS),a
- cp 128 ; Full buffer allocated?
- jp nz,INITX ; No, init. done
-
- push ix
- pop bc
- call FRECS
- jp c,INITX ; TPA remaining < 128 bytes
- ld (BUF2PTR),bc
- ld (BUF2RECS),a
- cp 128 ; Full buffer allocated?
- jp nz,INITX ; No, init. done
-
- push ix
- pop bc
- call FRECS
- jp c,INITX ; TPA remaining < 128 bytes
- ld (BUF3PTR),bc
- ld (BUF3RECS),a
- cp 128 ; Full buffer allocated?
- jp nz,INITX ; No, init. done
-
- push ix
- pop bc
- call FRECS
- jp c,INITX ; TPA remaining < 128 bytes
- ld (BUF4PTR),bc
- ld (BUF4RECS),a ; Has to be < 128 records
- INITX:
-
- ; At this point we have allocated up to 4 buffers of 128 records or less.
- ; Each buffer's size is indicated by (BUFnRECS).
-
- call PRINT
- db ' Reading ',0
-
- ; Perform initial READ before making destination file for maximum throughput.
-
- call READMLT
- call TELLK ; Tell records read
-
- ld a,(DUSER)
- ld e,a
- ld c,FUSER
- call BDOS
- MAKE:
- call TRAP ; Return error mode
- ld de,CPFCB
- ld c,FMAKE
- call BDOS
- call UNTRAP ; Default error mode
-
- or a ; Make OK?
- jp z,RWLP1 ; Yes
- ld a,h
- cp 8 ; File exists?
- jp nz,FULERR ; No, disk error
-
- call PRINT
- db CR,LF,BELL,' Erase destination file (Y/N)? N',BS,0
- call CAPINE
- call CRLF
- cp 'Y'
- jp nz,ABEXIT
- ERASE:
- call TRAP
- ld de,CPFCB
- ld c,FDEL
- call BDOS
- call UNTRAP
- or a ; Delete OK?
- jr z,MAKE ; Yes
- ld a,h
- cp 3 ; No. File R/O?
- jp nz,FULERR ; No, quit (disk R/O, etc.)
- call PRINT
- db BELL,' Erase R/O file (Y/N)? N',BS,0
- call CAPINE
- call CRLF
- cp 'Y'
- jp nz,ABEXIT
- ld a,(CPFCB+ROOFF)
- res 7,a
- ld (CPFCB+ROOFF),a
- ld de,CPFCB
- ld c,SFATT
- call BDOS
- or a
- jp nz,NOFLERR ; Shouldn't happen, but just to be safe
- jr ERASE ; Should work this time
-
-
- ; -----------------------------------
-
- ; MAIN COPY LOOP
-
- ; -----------------------------------
-
- RWLOOP:
- call PRINT
- db CR,TAB,TAB,TAB,TAB ; Clear messages
- db CR,' Reading ',0
- ld a,(SUSER)
- ld e,a
- ld c,FUSER
- call BDOS
- call READMLT
- call TELLK
- RWLP1: ; Entry point from above
- call PRINT
- db ' Writing, ',0
- ld a,(DUSER)
- ld e,a
- ld c,FUSER
- call BDOS
- call WRITMLT
- ld a,(EOFFLG)
- or a
- jr z,RWLOOP
- call CLOSE ; Close and stamp
- jp DONE
-
- ; ========================================
- ;
- ; SUBROUTINES
- ;
- ; ========================================
-
- ; READMLT - Read Multi-Sector
-
- READMLT:
- xor a ; Reset counters
- ld (BUF1IN),a
- ld (BUF2IN),a
- ld (BUF3IN),a
- ld (BUF4IN),a
- ;
- ; Read until buffers filled or EOF
- ;
- ld de,(BUF1PTR) ; Buffer address
- ld a,(BUF1RECS) ; Buffer size; at least 1 record
- call BUFREAD ; EOF?
- ld a,h ; Records read if filled
- ld (BUF1IN),a
- jr z,EOF ; EOF, quit
- ld a,(BUF1RECS) ; Otherwise, buffer filled
- ld (BUF1IN),a
- READ2: ld a,(BUF2RECS)
- or a
- ret z ; No space
- ld de,(BUF2PTR)
- call BUFREAD
- ld a,h ; Records read if filled
- ld (BUF2IN),a
- jr z,EOF ; EOF, quit
- ld a,(BUF2RECS) ; Otherwise, buffer filled
- ld (BUF2IN),a
- READ3: ld a,(BUF3RECS)
- or a
- ret z ; No space
- ld de,(BUF3PTR)
- call BUFREAD
- ld a,h ; Records read if filled
- ld (BUF3IN),a
- jr z,EOF ; EOF, quit
- ld a,(BUF3RECS) ; Otherwise, buffer filled
- ld (BUF3IN),a
- READ4: ld a,(BUF4RECS)
- or a
- ret z ; No space
- ld de,(BUF4PTR)
- call BUFREAD
- ld a,h ; Records read if filled
- ld (BUF4IN),a
- jr z,EOF ; EOF, quit
- ld a,(BUF4RECS) ; Otherwise, buffer filled
- ld (BUF4IN),a
- ret
- EOF:
- ld a,0FFh
- ld (EOFFLG),a
- ret
- BUFREAD:
- push af ; Save buffer size
- ld c,SDMA ; Set to buffer
- call BDOS
- pop af
- ld e,a
- ld c,FMULTI ; Set MULTI count
- call BDOS
- ld de,FCB1
- ld c,FREADS ; Read (up to) 1st bufferful
- call BDOS
- cp 2
- jp nc,UNKERR
- cp 1 ; (Z) if EOF
- ret
-
-
- ; -----------------------------------
-
- ; WRTMLT - Write Multi-Sector
- ; Write until buffers exhausted
- ;
- WRITMLT:
- ld a,(BUF1IN) ; Test 1st buffer dirty
- or a
- ret z
- ld de,(BUF1PTR) ; Buffer address
- call BUFWRIT
- ld a,(BUF2IN) ; Test 1st buffer dirty
- or a
- ret z
- ld de,(BUF2PTR) ; Buffer address
- call BUFWRIT
- ld a,(BUF3IN) ; Test 1st buffer dirty
- or a
- ret z
- ld de,(BUF3PTR) ; Buffer address
- call BUFWRIT
- ld a,(BUF4IN) ; Test 1st buffer dirty
- or a
- ret z
- ld de,(BUF4PTR) ; Buffer address
- ; fall thru
-
- ; Write A records from buffer at DE to (CPFCB)
-
- BUFWRIT:
- push af ; Save records
- ld c,SDMA
- call BDOS
- pop af
- ld e,a ; Set MULTI
- ld c,FMULTI
- call BDOS
- ld de,CPFCB
- ld c,FWRITS
- call BDOS
- or a
- ret z
- jp FWRITER ; NZ means write error
-
- ; ------------------------------------------------------
-
- ; CLOSE - Close output file
-
- CLOSE:
- ld c,FCLOSE
- ld de,CPFCB
- call BDOS ; BDOS aborts here on hard error
- or a
- jp nz,UNKERR ; File not found (in case user switched disk)
- ld a,(DATEOPT) ; Do stamp?
- or a
- ret z ; No.
- ld a,(GOTSTP) ; Stamp returned by CP/M3?
- or a
- ret nz ; No.
- ld hl,STPBUF
- call ISBCDD ; Check for validity (CPM3 may return 00's)
- ret nz
- ld de,CPFCB
- ld bc,(RAMPTR) ; <crw>
- call SSTPCP
- jp nz,SSTPERR
- call PRINT
- db 'Stamped, ',0
- ret
-
- ; ------------------------------------------
- ;
- ; TELLK - Tell how many kilobytes (or records) read so far
- ;
- TELLK: ld hl,(XFERED)
- ld b,0
- ld a,(BUF1IN)
- ld c,a
- add hl,bc
- ld a,(BUF2IN)
- ld c,a
- add hl,bc
- ld a,(BUF3IN)
- ld c,a
- add hl,bc
- ld a,(BUF4IN)
- ld c,a
- add hl,bc ; HL holds total records Xfered
- ld (XFERED),hl
-
- xor a
- srl h ; Divide by 8 to get K
- rr l
- rra ; Save remainder
- srl h
- rr l
- rra
- srl h
- rr l
- rra
- rra
- rra
- rra
- rra
- rra ; A = remainder in records
-
- call PHLFDC ; Show K as up to 5 decimal
- call PRINT
- db 'k ',0
- call PAFDC ; Show records as 0..7
- call PRINT
- db 'r,',0
- ret
-
- ; Reading 5k 0r, Writing, Stamped, Done.
-
- ; -------------------------------------------
- ;
- ; FRECS - Get free TPA in records
- ;
- ; Entry: BC = buffer start
- ; Exit: (C) - overflow error
- ; (NC) - A = free records
- ; - IX = buffer end
- ;
- FRECS: ld hl,(BDOS+1)
- ld de,128
- xor a
- sbc hl,de ; BDOS - 128 (never carries)
- sbc hl,bc ; (BDOS-128-buffer) --> HL
- ret c ; Overflow (BDOS-buffer < 128)
- push bc
- pop ix ; IX = buffer start
- add hl,de ; HL = free space in bytes
- ld a,1 ; Count free records (at least 1)
- add ix,de ; ..keep buffer end
- FRECN: sbc hl,de
- ret z ; Even
- jr c,FRECX ; Past end
- inc a ; Count last one
- cp 129 ; Avoid overflow in A
- jr z,FRECX
- add ix,de ; Count last one
- jr FRECN
- FRECX:
- dec a
- and a ; Set to (NC)
- ret
- ;
- IFWILD: ; Check 11-byte filename for '?'
- push hl
- push bc
- ld b,11
- IFWIL1: ld a,(hl)
- cp '?'
- jp z,AMBIGERR
- inc hl
- djnz IFWIL1
- pop bc
- pop hl
- ret
- ;
- BADOPT:
- call PRINT
- db BELL,' Bad option: /',0
- call COUT
- call CRLF
-
- HELP: ld hl,HELPST
- jp EXPRINT
-
- DONE: ld hl,DONEST
- jp EXPRINT
-
- ;
- TRAP: ; Trap CP/M+ errors
- ld c,ERMODE
- ld e,0FFh ; Return error mode
- jp BDOS
- ;
- UNTRAP: ; UnTrap CP/M+ errors
- push af ; Save result codes
- push hl
- ld c,ERMODE
- ld e,0 ; Default error mode
- call BDOS
- pop hl
- pop af
- ret
- ;
- SPACE:
- ld a,' '
- jp COUT
-
- CAPINE: ; Broken in SYSLIB 4.2
- push bc
- push de
- push hl
- ld a,3
- call BIOS
- cp 'a'
- jr c,CAPIN1
- and 01011111b ; Lowercase it
- CAPIN1: call COUT
- pop hl
- pop de
- pop bc
- ret
-
- ; -----------------------------------
-
- ; ERROR ROUTINES
-
- ; Routines to chain to Error Handler (EH)
-
- ; 1. Error codes (from ZCPR34.LBR)
-
- ; ZCPR34 uses the error byte at the beginning of the message buffer as a flag
- ; to show what kind of error occurred. Advanced error handlers will be able
- ; to help the user further by suggesting the possible cause of the error.
-
- ecbaddir equ 2 ; Bad directory specification -- logging of
- ; ..user number beyond legal range,
- ; ..nonexistent named directory
-
- ecunknown equ 4 ; EH unknown error
-
- ecambig equ 8 ; Ambiguous file specification where not
- ; ..allowed (SAVE, GET, REN)
- ecbadnum equ 9 ; Bad numerical value -- not a number where
- ; ..number expected, number out of range
- ecnofile equ 10 ; File not found -- REN, TYPE, LIST could not
- ; ..find a specified file
- ecdiskfull equ 11 ; Disk directory or data area full
- ; ..(DOS write error)
- ectpafull equ 12 ; TPA overflow error
- ecdupspec equ 16 ; Duplicate filespecs
-
- ; 2. Error Routines
-
- UnkErr: ld a,ecunknown
- jr errexit
-
- TPAErr: ld a,ectpafull ; TPA overflow
- jr errexit
-
- AmbigErr:
- ld a,ecambig ; Ambiguous filespec
- jr errexit
-
- NoFlErr: ; File missing
- ld a,ecnofile ; File not found error
- jr errexit ; Chain to error handler
-
- FulErr: ; Disk or directory full (BDOS write error)
- ld a,ecdiskfull ; Disk or data area full
- jr errexit ; Chain to error handler
- DupErr: ; Duplicate file specs
- ld a,ecdupspec ; Duplicate filespec error
- jr errexit ; Chain to error handler
-
- ; Check for illegal directory specification under ZCPR 3.4.
- ; DirChek assumes that FCB's have not been altered since they were
- ; set by the CCP. Therefore DirChek is called before other BDOS calls.
-
- DirChek:
- ld a,(fcb1+15) ; Z34 sets these to non zero
- ld hl,fcb2+15 ; ..if illegal dirspecs. found
- or (hl)
- ret z ; Return if OK
- ld a,ecbaddir ; Bad dir. error code
- ; fall thru
- ;
- ; Set error type, then set error, ECP, and external program bits of command
- ; status flag to tell CCP to go straight to EH.
-
- ErrExit:
- ld b,0
- ErrEx1: ex af,af'
- ld hl,(ENVADDR)
- ld de,34
- add hl,de
- ld a,(hl)
- inc hl
- ld h,(hl)
- ld l,a ; HL points to message buffer
- ex af,af'
- ld (hl),a ; First set error type in error byte
- ld a,00001110b ; Tell CCP External, No ECP, Error, No shell
- or b ; Add any specified bits
- inc hl
- inc hl
- inc hl
- ld (hl),a ; Set bits in command status flag
- jp exit ; Return to CCP
-
- ; -------------------------------------------------------------
-
- SSTPERR: ; Report Set Stamp error
- call PRINT
- db CR,LF,' Set stamp error: ',0
- ld hl,SSER01
- cp 1
- jp z,PSTR
- ld hl,SSER02
- cp 2
- jp z,PSTR
- ld hl,SSER03
- cp 3
- jp z,PSTR
- ld hl,SSER04
- cp 4
- jp z,PSTR
- ld hl,SSER05
- cp 5
- jp z,PSTR
- ld hl,SSERFF
- cp 0FFh
- jp z,PSTR
- ld hl,SSERUN
- jp PSTR
-
- SSER01: db 'BIOS write ' 0
- SSER02: db 'BIOS read ',0
- SSER03: db 'drive invalid ',0
- SSER04: db 'BIOS sectors > 1k ',0
- SSER05: db 'no stamps on disk ',0
- SSERFF: db 'file not found ',0
- SSERUN: db 'unknown ',0
-
- ;
- NOTC3: ; Not CPM3
- call PRINT
- db CR,LF,' Requires Z3PLUS',0
- jp ABEXIT
-
- FWRITER: ; Write error
- ld de,CPFCB ; Close file before quitting
- ld c,FCLOSE
- call BDOS ; BDOS aborts here on hard error
- or a
- jp nz,UNKERR ; File not found (in case user switched disk)
- ld de,CPFCB ; File closed OK, now delete partial file
- ld c,FDEL
- call BDOS
- jp FULERR
-
- EXPRINT:call PSTR
- jr EXIT
-
- ABEXIT:
- call PRINT
- db CR,LF,' JC aborting.',CR,LF,0
- EXIT: ld sp,(STKSAV)
- ret
-
- ; -------------------------------------
-
- ; DATA AREA
-
- ; INITALIZED DATA
-
-
- $MEMRY equ $
- RAMPTR: dw 0000 ; Filled by linker
- ; ..(allows linked modules w/DSEGS) <crw>
- SIGNST:
- db CR,LF,'JETCP'
- if PLUS
- db '+'
- endif
- db ', Vers. ',VERS / 10 + '0','.',VERS MOD 10 + '0'
- db ' - Copy Z3PLUS files, Copr. 1990 by C. Wilson',CR,LF
- db 0
-
- HELPST:
- db ' Usage:',CR,LF
- db TAB,'JC [dir:]ufn [dir:][ufn] [[/]options]',CR,LF
- db ' Options:',CR,LF
- db TAB,'D - toggle Datestamp',CR,LF
- db 0
-
- DONEST:
- db 'Done.',CR,LF,0
-
- ; -----------------------------------------------
- ;
- ; UNINITIALIZED RAM
- ;
-
- DSEG
-
- ; Copy FCB
-
- CPFCB: ds FCBLEN
-
- SUSER: ds 1
- DUSER: ds 1
-
- ; Pointers & counters
-
- BUF1PTR: ds 2
- BUF1RECS:ds 1
- BUF1IN: ds 1
-
- BUF2PTR: ds 2
- BUF2RECS:ds 1
- BUF2IN: ds 1
-
- BUF3PTR: ds 2
- BUF3RECS:ds 1
- BUF3IN: ds 1
-
- BUF4PTR: ds 2
- BUF4RECS:ds 1
- BUF4IN: ds 1
-
- XFERED: ds 2
-
- ; FLAGS
-
- DATEOPT:ds 1
- EOFFLG: ds 1
- GOTSTP: ds 1
-
- ; BUFFERS
-
- STKSAV: ds 2
- ds 50
- STACK:
-
- STPBUF: ds 128
-
- ;DMABUF: ds 1024 ; For CP/M+ set stamp
-
- end